package com.ruoyi.code.base


import android.app.Dialog
import android.content.Context
import android.os.Bundle
import androidx.annotation.StyleRes
import androidx.viewbinding.ViewBinding
import com.ruoyi.app.R
import com.ruoyi.code.base.viewbinding.base.ViewBindingUtil


abstract class BaseBindingDialog<VB : ViewBinding>(
    context: Context,
    @StyleRes themeResId: Int = R.style.CustomDialogStyle,//全屏DialogFullscreen
) : Dialog(context, themeResId) {

    lateinit var binding: VB

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ViewBindingUtil.inflateWithGeneric(this, layoutInflater)
        setContentView(binding.root)
        initView()
    }

    abstract fun initView()
}